import request from '@/utils/request'
/* 实现新增部门 */
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data

  })
}
/* 实现查询部门 */
export function getDepartments() {
  return request({
    url: '/company/department'

  })
}
/* 实现修改部门 */
export function updateDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'post',
    data

  })
}
/* 实现删除部门  @param {id} */
export function delDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'

  })
}
/* 实现查询某一个部门
@param {id}
*/
export function getDepartmentDetaill(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'

  })
}

